package com.kaishengit.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaishengit.dao.CustomerDao;
import com.kaishengit.pojo.Customer;

@Service
@Transactional
public class CustomerService {
	private CustomerDao customerDao;
	
	public void add(Customer customer){
		customerDao.add(customer);
	}
	public void edit(Customer customer){
		customerDao.edit(customer);
	}
	public void del(String id){
		customerDao.del(id);
	}
	public List<Customer> findAll(){
		return customerDao.findAll();
	}
	public Customer findById(String id) {
		return customerDao.findById(id);
	}
	@Autowired
	public void setCustomerDao(CustomerDao customerDao) {
		this.customerDao = customerDao;
	}
	
}
